package dfl.bysj.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import dfl.bysj.entity.ReserveTime;
import dfl.bysj.entity.VO.Form_ReserveTime;
import dfl.bysj.mapper.ReserveTimeMapper;
import dfl.bysj.service.ReserveTimeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author DFL
 * @since 2022-05-17
 */
@Service
public class ReserveTimeServiceImpl extends ServiceImpl<ReserveTimeMapper, ReserveTime> implements ReserveTimeService {

    @Override
    public List<ReserveTime> getAllReserveTime() {
        return list();
    }

    @Override
    public void updateReserveTime(Form_ReserveTime form_reserveTime) {
        ReserveTime reserveTime=new ReserveTime(form_reserveTime);
        update(reserveTime,new QueryWrapper<ReserveTime>()
                .eq("res_time_id", reserveTime.getResTimeId()));
    }
}
